<template>
  <div class="mycard">
    <div class="card">
      <div class="top">
        <span @click="back">＜</span>
        <span>我的影票</span>
        <span></span>
      </div>
      <div class="main">
        <div class="detail">
          <div class="left">
            <h3>{{list.title}}</h3>
            <p>{{list.time}}</p>
            <p>{{list.cinema}}</p>
            <p>{{list.address}}</p>
          </div>
          <img :src="list.imgs" alt />
        </div>
        <hr />
        <div class="bot">
          <div class="num">
            <span>取票码</span>
            <span>{{Math.random()}}</span>
            <span>{{list.price*list.num}} 元</span>
          </div>
          <img src="@/assets/images/user/user-card.png" alt />
          <p>{{list.num}} 张电影票</p>
        </div>
        <hr />
        <div class="foot">
          <div class="place">
            <span>{{list.cinema}}</span>
            <span>1.3km</span>
          </div>
          <div class="call">
            <span>地址:云龙区万达广场3层</span>
            <img src="@/assets/images/user/user-phone.png" alt />
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      // list:{}
    };
  },
  computed: {
    list() {
      return this.$store.state.orderList.find(
        ele => ele.ids == this.$route.params.ids
      );
    }
  },
  created() {},
  mounted() {},
  methods: {
    back() {
      this.$router.go(-1);
    }
  }
};
</script>
<style lang="scss" >
</style>
<style scoped lang="scss">
.mycard {
  width: 100%;
  height: 100%;
  background-color: #33363d;
  .card {
    overflow: hidden;
    .top {
      display: flex;
      justify-content: space-between;
      width: calc(100% - 40px);
      margin: 20px auto 60px;
      font-size: 20px;
      color: white;
      :last-child {
        width: 20px;
      }
    }
    .main {
      width: 340px;
      height: 519px;
      margin: 0 auto;
      background: url(~@/assets/images/user/user-bgcard.png) no-repeat center;
      background-size: 100% 100%;
      hr {
        width: 280px;
        height: 2px;
        margin: 0 auto;
      }
      .detail {
        display: flex;
        height: 176px;
        justify-content: space-around;
        align-items: center;
        .left {
          text-align: left;
          overflow: hidden;
          h3 {
            font-size: 18px;
            color: #3a3a3a;
            margin: 5px 0;
          }
          p {
            margin: 5px 0;
          }
        }
        img {
          width: 78px;
          height: 114px;
        }
      }
      .bot {
        text-align: center;
        .num {
          width: calc(100% - 80px);
          display: flex;
          height: 20px;
          justify-content: space-between;
          align-items: center;
          margin: 25px auto;
          font-size: 14px;
          :nth-child(2) {
            width: 160px;
            line-height: 20px;
            border: 1px solid grey;
          }
        }
        img {
          width: 144px;
          height: 144px;
        }
      }
      .foot {
        .place,
        .call {
          width: calc(100% - 80px);
          margin: 6px auto;
          display: flex;
          font-size: 14px;
          justify-content: space-between;
          img {
            width: 18px;
            height: 19px;
            margin-right: 8px;
          }
        }
      }
    }
  }
}
</style>
